[TASK] Declare the direct dependencies each package uses - #1356
Conversation
7839861 to
d8ee040
Compare
Every split package uses libraries in its production code without requiring them. The classes resolve inside the monorepo because the root pulls everything in together, but every packages/* directory is published on its own, and there the metadata is wrong: phpdocumentor/filesystem ships a FlySystemAdapter whose Flysystem and Flyfinder classes nothing requires. Only additions that change no resolution a consumer has today: every library added here is already installed transitively, and the constraints follow what this repository declares elsewhere. guides-theme-rst gets symfony/polyfill-mbstring for the same reason, since RstExtension calls mb_str_pad() while the package allows PHP 8.1. The remainder needs decisions rather than declarations and stays in phpDocumentor#1355. Refs phpDocumentor#1355 Signed-off-by: Sebastian Mendel <info@sebastianmendel.de> Assisted-by: claude-code:claude-fable-5 Agent-Session: https://claude.ai/code/session_0114KJz3vqq2WWfx4FUdmcss Agent-Host: 0493f0
d8ee040 to
5f7e7ae
Compare
|
Small non-blocking note on
|
Implements the mechanical half of #1355; everything that needs a decision stays there.
Problem
Every split package uses libraries in its production code without requiring them; this changes the nine where the missing entry needs no decision. The classes resolve inside the monorepo because the root pulls everything in together, but every
packages/*directory is published as its own Composer package, and there the metadata is wrong.phpdocumentor/filesystemis the clearest case: it ships aFlySystemAdapterbuilt onLeague\FlysystemandFlyfinder, and requires neither.What this adds
27 declarations across nine packages. Every library added here is already installed transitively today, so no consumer loses a resolution, and the constraints follow what this repository declares elsewhere. Existing entries keep their order; nothing is re-sorted.
league/flysystem,phpdocumentor/flyfinderleague/uri-interfaces,psr/clock,psr/container,symfony/http-client-contractsdoctrine/deprecations,league/tactician,phpdocumentor/filesystem,phpdocumentor/flyfinder,psr/clock,psr/container,psr/event-dispatcher,webmozart/asserttwig/twigsymfony/http-client-contracts,webmozart/assertsymfony/stringphpdocumentor/flyfinder,symfony/stringsymfony/polyfill-mbstring,twig/twigguzzlehttp/psr7,psr/event-dispatcher,ratchet/rfc6455,react/event-loop,symfony/event-dispatcher-contractsThe one entry that is not simply a library the code imports:
guides-theme-rstcallsmb_str_pad()inRstTheme/Twig/RstExtension.php:154, which PHP provides only from 8.3 while the package allows^8.1.symfony/polyfill-mbstringsupplies it from v1.28 and already arrives throughsymfony/stringandtwig/twig; this declares it. Verified by installing the package standalone in a PHP 8.1 container.psr/logwas #1354, which has since merged; this branch is rebased on top of it and both columns above are measured against thatmain.Verification
Measured, not assumed. Every package was copied out, installed standalone with
autoload-devandrequire-devremoved, and checked withcomposer-require-checker— once againstmainand once against this branch, so both columns share one baseline:mainguides-theme-bootstrapis unchanged because its only gap is the Symfony config and container pair, which stays in #1355. Every symbol still listed elsewhere belongs to a decision item there, topsr/logfrom #1354, or to docblock pseudo-types that belong incomposer-require-checker.json.Note for anyone re-running this: the
composer-require-checkerversion pinned in.phive/phars.xml, 3.5.1, aborts onsymfony/configv8 with a parse error and produces empty output that reads like a pass. These numbers come fromcomposer-require-checker4.24.0.Full suite 828 tests, no failures, also with
--prefer-lowest. PHPStan and PHPCS clean.composer validate --strictpasses for the root and every package.Assisted by claude-code:claude-fable-5 — Session